<?php /*a:1:{s:83:"/Users/zhaojun/Workspace/wwwtp/dancephp.com/application/admin/view/login/index.html";i:1628844923;}*/ ?>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
	<meta name="description" content="">
	<meta name="author" content="">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="renderer" content="webkit|ie-comp|ie-stand">
	<title>danceAdmin - Login</title>

	<!-- Custom fonts for this template-->
	<link rel="stylesheet" href="/static/iconfont/iconfont.css" />

	<!-- Custom styles for this template-->
	<link href="/static/danceAdmin/css/bootstrap.min.css" rel="stylesheet">
	<link href="/static/danceAdmin/css/dance-admin.css" rel="stylesheet">
</head>
<body class="bg-gradient-light">

<div class="container">

	<!-- Outer Row -->
	<div class="row justify-content-center">

		<div class="col-xl-6 col-lg-12 col-md-9">

			<div class="card o-hidden border-0 shadow-lg my-5">
				<div class="card-body p-0">
					<!-- Nested Row within Card Body -->
					<div class="row">
						<div class="col-lg-12">
							<div class="p-5">
								<div class="text-center">
									<h1 class="h4 text-gray-900 mb-4">欢迎您</h1>
								</div>
								<form class="user">
									<div class="form-group">
										<input type="email" class="form-control form-control-user" name="username" aria-describedby="emailHelp" placeholder="请输入用户名">
									</div>
									<div class="form-group">
										<input type="password" class="form-control form-control-user" name="password" placeholder="请输入密码">
									</div>
									<div class="form-group">
										<div class="custom-control custom-checkbox small">
											<input type="checkbox" class="custom-control-input" id="login-remember-me" checked>
											<label class="custom-control-label" for="customCheck">下次自动登录</label>
										</div>
									</div>
									<a href="javascript:;" class="btn btn-primary btn-user btn-block J_login">登录</a>
								</form>
								<hr>
							</div>
							<div class="p-5">
								<a href="<?php echo url('mobmall/mine/doAdminLogin'); ?>" class="btn btn-success">
									<i class="iconfontzz icon-user"></i>
									前台用户授权登录
								</a>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>

<!-- Bootstrap core JavaScript-->
<script src="/static/danceAdmin/vendor/jquery/jquery.min.js"></script>
<script src="/static/danceAdmin/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>

<!-- Custom scripts for all pages-->
<script src="/static/danceAdmin/js/dance-admin.min.js"></script>

<script type="text/javascript" src="/static/danceui/js/jquery.form.js"></script>
<script type="text/javascript" src="/static/plugins/layer/layer.js"></script>
<script type="text/javascript" src="/static/danceui/js/danceui.js"></script>
<script type="text/javascript">
$(".J_login").on('click', function(e){
	e.preventDefault();

	var username   = $("input[name='username']");
	var password   = $("input[name='password']");
	var captcha    = $("input[name='captcha']");

	if($('#login-remember-me').is(':checked')) {
		var rememberme = 1;
	}else {
		var rememberme = 0;
	}

	if(username.val()==''){
		username.focus();
		return false
	}
	if(password.val()==''){
		password.focus();
		return false
	}
    if(0 && captcha.val()==''){
        captcha.focus();
        return false
    }

	$.ajax({
		type: 'POST',
		url: "<?php echo BASE_PATH; ?><?php echo url('admin/login/doLogin'); ?>",
		data: {
			username:username.val(),
			password:password.val(),
			captcha:captcha.val(),
			rememberme:rememberme,
		},
		beforeSend:function(){
			layer.load(1, {shade: [0.1,'#fff'], time: 500});
		},
		success:function(ret){
			layer.closeAll();
			if(ret.code == 1){
				window.location.href = ret.url;
			}else{
				layer.msg(ret.msg, {icon:5});
				//verifys('code');
			}
		}
	});
})
</script>
</body>
</html>